package cn.yuanqiao.archive.Identify.domain;/**
 * @author 赵常飞
 * @date 2023/7/15 15:15
 */

import cn.yuanqiao.common.exception.ServiceException;
import cn.yuanqiao.common.utils.StringUtils;
import cn.yuanqiao.common.core.domain.BaseEntity;
import cn.yuanqiao.common.utils.SecurityUtils;

/**
 *
 *@AUTHOR:赵常飞
 *@date 2023/7/15 15:15
 */
public class TenantYqJdFile extends BaseEntity {
    private final String BIGTABLENAME = "_JD_FILE";
    private static final long serialVersionUID = 1L;
    private String tableName;
    public TenantYqJdFile() {
        String tenantCode = SecurityUtils.getTenantCode();
        if(StringUtils.isEmpty(tenantCode)){
            throw new ServiceException("TenantCode is null");
        }else {
            this.tableName = tenantCode.toUpperCase()+BIGTABLENAME;
        }
    }
    public String getTableName() {
        return tableName;
    }

    public void setTableName(String tableName) {
        this.tableName = tableName;
    }
    /** 主键id */
    private Long id;

    /** 任务id */
    private Long renwuid;

    /** 文件名 */
    private String fileName;

    /** 实际文件名 */
    private String realFileName;

    /** 文件大小 */
    private Long fileSize;

    /** 文件路径 */
    private String path;

    /** 类型 */
    private String type;

    private String mj;

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public Long getRenwuid() {
        return renwuid;
    }

    public void setRenwuid(Long renwuid) {
        this.renwuid = renwuid;
    }

    public String getFileName() {
        return fileName;
    }

    public void setFileName(String fileName) {
        this.fileName = fileName;
    }

    public Long getFileSize() {
        return fileSize;
    }

    public void setFileSize(Long fileSize) {
        this.fileSize = fileSize;
    }

    public String getPath() {
        return path;
    }

    public void setPath(String path) {
        this.path = path;
    }

    public String getType() {
        return type;
    }

    public void setType(String type) {
        this.type = type;
    }

    public String getRealFileName() {
        return realFileName;
    }

    public void setRealFileName(String realFileName) {
        this.realFileName = realFileName;
    }

    public String getMj() {
        return mj;
    }

    public void setMj(String mj) {
        this.mj = mj;
    }

    @Override
    public String toString() {
        return "TenantYqJdFile{" +
                "BIGTABLENAME='" + BIGTABLENAME + '\'' +
                ", tableName='" + tableName + '\'' +
                ", id=" + id +
                ", renwuid=" + renwuid +
                ", fileName='" + fileName + '\'' +
                ", realFileName='" + realFileName + '\'' +
                ", fileSize=" + fileSize +
                ", path='" + path + '\'' +
                ", type='" + type + '\'' +
                ", mj='" + mj + '\'' +
                '}';
    }
}
